package deviceScript

const (
	EnumEncoder = "encoder"
	EnumDecoder = "decoder"
	EnumMode    = "mode"

	EnumRecord   = "record"   // 记录，比如告警记录，门禁记录，数据以DeviceRecordEntity进入【设备记录】
	EnumResult   = "result"   // 结果，比如用户进行了人工操作，数据以OperateRecordEntity进入【操作记录】
	EnumStatus   = "status"   // 状态，比如设备的当前温度，数据以DeviceValueEntity进入Redis
	EnumSequence = "sequence" // 时序，比如连续的坐标数据，数据以TimeSeriesEntity进入【时序记录】
)

const (
	enumOperateName = "operateName"
	enumRecordType  = "recordType"
	enumData        = "data"
)

var (
	ExchangeService  *exchangeService
	PublishService   *publishService
	ReportService    *reportService
	EngineExecutor   *ScriptEngineExecutor
	EngineInitialize *ScriptEngineInitialize
	engineService    *ScriptEngineService
	engineModel      *ScriptEngineModel
	engineOperator   *ScriptEngineOperator
	notify           *OperateNotify
)

func init() {
	engineService = &ScriptEngineService{}
	engineService.engineMap = make(map[string]interface{})

	engineModel = &ScriptEngineModel{}
	engineModel.modelMap = make(map[string]interface{})

	notify = &OperateNotify{}
}
